<template>
  <div class="">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="(item, index) in detail.productList" :key="index">
        <img :src="item.primary_pic_url" alt="" />
      </van-swipe-item>
    </van-swipe>
    <!-- <h2>{{ item.name }}</h2> -->
  </div>
</template>

<script>
export default {
  data() {
    return {
      //   item: this.$route.query.item,
      id: this.$route.query.item.id,
      detail: "",
    };
  },
  mounted() {
    // console.log(this.item);
    this.$axios
      .get(
        "http://shop.bufantec.com/bufan/goods/detailaction?openId=13216484256&id=" +
          this.id
      )
      .then((res) => {
        console.log(res);
        this.detail = res.data;
      });
  },
  methods: {},
  components: {},
};
</script>

<style lang="scss">
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  // line-height: 150px;
  text-align: center;
  // background-color: #39a9ed;
  img {
    width: 100%;
    height: 250px;
  }
}
</style>
